<?php
$bd = new DB();
//GENERA TABLA CON DESCRIPCION DE TRAMOS
@$select_tramos = $bd->query("SELECT * FROM sub_sectores", OBJ);

if($select_tramos->affected_rows > 0) {
foreach($select_tramos->rows as $arr_tramos){
	echo '<tr>';
	echo '<td>'.$arr_tramos->nombre_sub.'</td>';
	echo '<td><div class="ventana"><a class="button small green" href="formularios/mantenedores/especificos/subsectores/editar.php?id='.$arr_tramos->id_sub.'"><span class="icon" data-icon="7" style="display: inline-block;"></span>Editar</a></div></td>';
	echo '<td><div class="ventana"><a class="button small red" href="formularios/mantenedores/especificos/subsectores/eliminar.php?id='.$arr_tramos->id_sub.'"><span class="icon" data-icon="T" style="display: inline-block;"></span>Eliminar</a></div></td>';
	echo '</tr>';
}
}else{
	echo '<tr>';
	echo '<td></td>';
	echo '<td></td>';
	echo '<td></td>';
	echo '</tr>';
}
?>